package cn.tedu.icop.api.service;
import cn.tedu.icop.api.domain.Attach;
import cn.tedu.icop.api.model.RestResult;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
@Component
public class AttachFallbackFactory implements FallbackFactory<AttachRemoteService> {
    @Override
    public AttachRemoteService create(Throwable cause) {
        return new AttachRemoteService() {
            @Override
            public RestResult batchUpdateBusiness(ArrayList<Attach> params) {
              throw new RuntimeException("AttachFallbackFactory 服务器忙,请稍后重试");
            }
        };
    }
}
